home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: Dortmund.Germany.EU.net!gellbo!wolfi
- From: wolfi@gellbo.gellrich-gmbh.de (Wolfgang Formann)
- Subject: Re: sscanf bug??????
- Message-ID: <06R9B8G@gellbo.gellrich-gmbh.de>
- Organization: Gellrich-GmbH
- References: <4fimvo$82s@fnord.dfw.net> <10FEB199622213548@erich.triumf.ca> <824160515snz@genesis.demon.co.uk> <4gh6uf$i2@mailhub.scitec.com.au>
- Date: Thu, 22 Feb 1996 19:56:41 GMT
-
- In <4gh6uf$i2@mailhub.scitec.com.au> ramsesy@rd.scitec.com.au (Ramses Youhana) writes:
-
- >You need the %ld for 16 bit processors or processors running in 16 bit mode.
- >Unfortunately, your stuck with this when using a PC (using 16 bit mode).
- >With 32 bit processors (such as a M68302 micro-controller) you don't need
- >the %ld. %d will do as the processor treats the number as a 32 bit entity
- >anyway. You have to be careful when saying that %ld and %d are interchangeable,
- >as a compiler for a 32 bit processor (such as the M68302) may not support the
- >"l" in the %ld format.
-
- Well until DEC's Alpha was released I thought the same. I did not write the
- 'l' in '%ld'. But then I had to port some of my code to this 64-bit
- architecture. It was horrible!
-
- So, if you plan to use your programs *ONLY* on 32-bit processors, then there
- is no need to write the 'l', but I am sure the 64-bitters will come sooner
- as we all do think and then the 'l' will be a *MUST*.
-
- --
- Wolfgang Formann (wolfi@gellbo.gellrich-gmbh.de)
-